home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / cat3 / InternAtom.3 < prev    next >
Text File  |  1994-09-20  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4. Tk_InternAtom(3)      Tk Library Procedures
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      Tk_InternAtom, Tk_GetAtomName - manage cache of X atoms
  12.  
  13. SYNOPSIS
  14.      #include <tk.h>
  15.  
  16.      Atom
  17.      Tk_InternAtom(_t_k_w_i_n, _n_a_m_e)
  18.  
  19.      char *
  20.      Tk_GetAtomName(_t_k_w_i_n, _a_t_o_m)
  21.  
  22. ARGUMENTS
  23.      Tk_Window   _t_k_w_i_n    (in)      Token for  window.   Used  to
  24.                                     map  atom or name relative to
  25.                                     a particular display.
  26.  
  27.      char        *_n_a_m_e    (in)      String name for which atom is
  28.                                     desired.
  29.  
  30.      Atom        _a_t_o_m     (in)      Atom for which  corresponding
  31.                                     string name is desired.
  32. _________________________________________________________________
  33.  
  34.  
  35. DESCRIPTION
  36.      These procedures are similar to the Xlib procedures  XInter-
  37.      nAtom  and  XGetAtomName.   Tk_InternAtom  returns  the atom
  38.      identifier associated with string given by _n_a_m_e;   the  atom
  39.      identifier  is  only  valid  for the display associated with
  40.      _t_k_w_i_n.  Tk_GetAtomName returns the  string  associated  with
  41.      _a_t_o_m   on   _t_k_w_i_n's   display.    The   string  returned  by
  42.      Tk_GetAtomName is in Tk's storage:  the caller need not free
  43.      this  space  when  finished  with the string, and the caller
  44.      should not modify the contents of the returned  string.   If
  45.      there   is   no   atom   _a_t_o_m   on   _t_k_w_i_n's  display,  then
  46.      Tk_GetAtomName returns the string ``?bad atom?''.
  47.  
  48.      Tk caches the  information  returned  by  Tk_InternAtom  and
  49.      Tk_GetAtomName so that future calls for the same information
  50.      can be  serviced  from  the  cache  without  contacting  the
  51.      server.  Thus Tk_InternAtom and Tk_GetAtomName are generally
  52.      much faster than their Xlib counterparts, and they should be
  53.      used in place of the Xlib procedures.
  54.  
  55.  
  56. KEYWORDS
  57.      atom, cache, display
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.